﻿package ygg.encoding.swf.abc.constant
{
	public class OpCode
	{
		public static const OP_bkpt:int = 				0x01; //1
		public static const OP_nop:int = 				0x02; //2
		public static const OP_throw:int = 				0x03; //3
		public static const OP_getsuper:int = 			0x04; //4
		public static const OP_setsuper:int = 			0x05; //5
		public static const OP_dxns:int = 				0x06; //6
		public static const OP_dxnslate:int = 			0x07; //7
		public static const OP_kill:int = 				0x08; //8
		public static const OP_label:int = 				0x09; //9
		// a b
		public static const OP_ifnlt:int = 				0x0C; //12
		public static const OP_ifnle:int = 				0x0D; //13
		public static const OP_ifngt:int = 				0x0E; //14
		public static const OP_ifnge:int = 				0x0F; //15
		public static const OP_jump:int = 				0x10; //16
		public static const OP_iftrue:int = 			0x11; //17
		public static const OP_iffalse:int = 			0x12; //18
		public static const OP_ifeq:int = 				0x13; //19
		public static const OP_ifne:int = 				0x14; //20
		public static const OP_iflt:int = 				0x15; //21
		public static const OP_ifle:int = 				0x16; //22
		public static const OP_ifgt:int = 				0x17; //23
		public static const OP_ifge:int = 				0x18; //24
		public static const OP_ifstricteq:int = 			0x19; //25
		public static const OP_ifstrictne:int = 			0x1A; //26
		public static const OP_lookupswitch:int = 			0x1B; //27
		public static const OP_pushwith:int = 				0x1C; //28
		public static const OP_popscope:int = 				0x1D; //29
		public static const OP_nextname:int = 				0x1E; //30
		public static const OP_hasnext:int = 				0x1F; //31
		public static const OP_pushnull:int = 				0x20; //32
		public static const OP_pushundefined:int = 			0x21; //33
		public static const OP_pushconstant:int = 			0x22; //34
		public static const OP_nextvalue:int = 				0x23; //35
		public static const OP_pushbyte:int = 				0x24; //36
		public static const OP_pushshort:int = 				0x25; //37
		public static const OP_pushtrue:int = 				0x26; //38
		public static const OP_pushfalse:int = 				0x27; //39
		public static const OP_pushnan:int = 				0x28; //40
		public static const OP_pop:int = 					0x29; //41
		public static const OP_dup:int = 					0x2A; //42
		public static const OP_swap:int = 					0x2B; //43
		public static const OP_pushstring:int = 			0x2C; //44
		public static const OP_pushint:int = 				0x2D; //45
		public static const OP_pushuint:int = 				0x2E; //46
		public static const OP_pushdouble:int = 			0x2F; //47
		public static const OP_pushscope:int = 				0x30; //48
		public static const OP_pushnamespace:int = 			0x31; //49
		public static const OP_hasnext2:int = 				0x32; //50
		//33-3F
		public static const OP_newfunction:int = 			0x40; //64
		public static const OP_call:int = 					0x41; //65
		public static const OP_construct:int = 				0x42; //66
		public static const OP_callmethod:int = 			0x43; //67
		public static const OP_callstatic:int = 			0x44; //68
		public static const OP_callsuper:int = 				0x45; //69
		public static const OP_callproperty:int = 			0x46; //70
		public static const OP_returnvoid:int = 			0x47; //71
		public static const OP_returnvalue:int = 			0x48; //72
		public static const OP_constructsuper:int = 		0x49; //73
		public static const OP_constructprop:int = 			0x4A; //74
		public static const OP_callsuperid:int = 			0x4B; //75
		public static const OP_callproplex:int = 			0x4C; //76
		public static const OP_callinterface:int = 			0x4D; //77
		public static const OP_callsupervoid:int = 			0x4E; //78
		public static const OP_callpropvoid:int = 			0x4F; //79
		//50-54
		public static const OP_newobject:int = 				0x55; //85
		public static const OP_newarray:int = 				0x56; //86
		public static const OP_newactivation:int = 			0x57; //87
		public static const OP_newclass:int = 				0x58; //88
		public static const OP_getdescendants:int = 		0x59; //89
		public static const OP_newcatch:int = 				0x5A; //90
		//b c
		public static const OP_findpropstrict:int = 		0x5D; //93
		public static const OP_findproperty:int = 			0x5E; //94
		public static const OP_finddef:int = 				0x5F; //95
		public static const OP_getlex:int = 				0x60; //96
		public static const OP_setproperty:int = 			0x61; //97
		public static const OP_getlocal:int = 				0x62; //98
		public static const OP_setlocal:int = 				0x63; //99
		public static const OP_getglobalscope:int = 		0x64; //100
		public static const OP_getscopeobject:int = 		0x65; //101
		public static const OP_getproperty:int = 			0x66; //102
		public static const OP_getpropertylate:int = 		0x67; //103
		public static const OP_initproperty:int = 			0x68; //104
		public static const OP_setpropertylate:int = 		0x69; //105
		public static const OP_deleteproperty:int = 		0x6A; //106
		public static const OP_deletepropertylate:int = 	0x6B; //107
		public static const OP_getslot:int = 				0x6C; //108
		public static const OP_setslot:int = 				0x6D; //109
		public static const OP_getglobalslot:int = 			0x6E; //110
		public static const OP_setglobalslot:int = 			0x6F; //111
		public static const OP_convert_s:int = 				0x70; //112
		public static const OP_esc_xelem:int = 				0x71; //113
		public static const OP_esc_xattr:int = 				0x72; //114
		public static const OP_convert_i:int = 				0x73; //115
		public static const OP_convert_u:int = 				0x74; //116
		public static const OP_convert_d:int = 				0x75; //117
		public static const OP_convert_b:int = 				0x76; //118
		public static const OP_convert_o:int = 				0x77; //119
		//78 - 7F
		public static const OP_coerce:int = 				0x80; //128
		public static const OP_coerce_b:int = 				0x81; //129
		public static const OP_coerce_a:int = 				0x82; //130
		public static const OP_coerce_i:int = 				0x83; //131
		public static const OP_coerce_d:int = 				0x84; //132
		public static const OP_coerce_s:int = 				0x85; //133
		public static const OP_astype:int = 				0x86; //134
		public static const OP_astypelate:int = 			0x87; //135
		public static const OP_coerce_u:int = 				0x88; //136
		public static const OP_coerce_o:int = 				0x89; //137
		//8A - 8F
		public static const OP_negate:int = 				0x90; //144
		public static const OP_increment:int = 				0x91; //145
		public static const OP_inclocal:int = 				0x92; //146
		public static const OP_decrement:int = 				0x93; //147
		public static const OP_declocal:int = 				0x94; //148
		public static const OP_typeof:int = 				0x95; //149
		public static const OP_not:int = 					0x96; //150
		public static const OP_bitnot:int = 				0x97; //151
		//98 99
		public static const OP_concat:int = 				0x9A; //154
		public static const OP_add_d:int = 					0x9B; //155
		//9c-9F
		public static const OP_add:int = 					0xA0; //160
		public static const OP_subtract:int = 				0xA1; //161
		public static const OP_multiply:int = 				0xA2; //162
		public static const OP_divide:int = 				0xA3; //163
		public static const OP_modulo:int = 				0xA4; //164
		public static const OP_lshift:int = 				0xA5; //165
		public static const OP_rshift:int = 				0xA6; //166
		public static const OP_urshift:int = 				0xA7; //167
		public static const OP_bitand:int = 				0xA8; //168
		public static const OP_bitor:int = 					0xA9; //169
		public static const OP_bitxor:int = 				0xAA; //170
		public static const OP_equals:int = 				0xAB; //171
		public static const OP_strictequals:int = 			0xAC; //172
		public static const OP_lessthan:int = 				0xAD; //173
		public static const OP_lessequals:int = 			0xAE; //174
		public static const OP_greaterthan:int = 			0xAF; //175
		public static const OP_greaterequals:int = 			0xB0; //176
		public static const OP_instanceof:int = 			0xB1; //177
		public static const OP_istype:int = 				0xB2; //178
		public static const OP_istypelate:int = 			0xB3; //179
		public static const OP_in:int = 					0xB4; //180
		//B5 - BF
		public static const OP_increment_i:int = 			0xC0; //192
		public static const OP_decrement_i:int = 			0xC1; //193
		public static const OP_inclocal_i:int = 			0xC2; //194
		public static const OP_declocal_i:int = 			0xC3; //195
		public static const OP_negate_i:int = 				0xC4; //196
		public static const OP_add_i:int = 					0xC5; //197
		public static const OP_subtract_i:int = 			0xC6; //198
		public static const OP_multiply_i:int = 			0xC7; //199
		//C8-CF
		public static const OP_getlocal0:int = 				0xD0; //208
		public static const OP_getlocal1:int = 				0xD1; //209
		public static const OP_getlocal2:int = 				0xD2; //210
		public static const OP_getlocal3:int = 				0xD3; //211
		public static const OP_setlocal0:int = 				0xD4; //212
		public static const OP_setlocal1:int = 				0xD5; //213
		public static const OP_setlocal2:int = 				0xD6; //214
		public static const OP_setlocal3:int = 				0xD7; //215
		//D8 - DE
		public static const OP_debug:int = 					0xEF; //239
		public static const OP_debugline:int = 				0xF0; //240
		public static const OP_debugfile:int = 				0xF1; //241
		public static const OP_bkptline:int = 				0xF2; //242
		
		//13 more in opNames

		public static const opNames:Array = [
			"OP_0x00       ",
			"bkpt          ",
			"nop           ",
			"throw         ",
			"getsuper      ",
			"setsuper      ",
			"dxns          ",
			"dxnslate      ",
			"kill          ",
			"label         ",
			"OP_0x0A       ",
			"OP_0x0B       ",
			"ifnlt         ",
			"ifnle         ",
			"ifngt         ",
			"ifnge         ",
			"jump          ",
			"iftrue        ",
			"iffalse       ",
			"ifeq          ",
			"ifne          ",
			"iflt          ",
			"ifle          ",
			"ifgt          ",
			"ifge          ",
			"ifstricteq    ",
			"ifstrictne    ",
			"lookupswitch  ",
			"pushwith      ",
			"popscope      ",
			"nextname      ",
			"hasnext       ",
			"pushnull      ",
			"pushundefined ",
			"pushconstant  ",
			"nextvalue     ",
			"pushbyte      ",
			"pushshort     ",
			"pushtrue      ",
			"pushfalse     ",
			"pushnan       ",
			"pop           ",
			"dup           ",
			"swap          ",
			"pushstring    ",
			"pushint       ",
			"pushuint      ",
			"pushdouble    ",
			"pushscope     ",
			"pushnamespace ",
			"hasnext2      ",
			"OP_0x33       ",
			"OP_0x34       ",
			"OP_0x35       ",
			"OP_0x36       ",
			"OP_0x37       ",
			"OP_0x38       ",
			"OP_0x39       ",
			"OP_0x3A       ",
			"OP_0x3B       ",
			"OP_0x3C       ",
			"OP_0x3D       ",
			"OP_0x3E       ",
			"OP_0x3F       ",
			"newfunction   ",
			"call          ",
			"construct     ",
			"callmethod    ",
			"callstatic    ",
			"callsuper     ",
			"callproperty  ",
			"returnvoid    ",
			"returnvalue   ",
			"constructsuper",
			"constructprop ",
			"callsuperid   ",
			"callproplex   ",
			"callinterface ",
			"callsupervoid ",
			"callpropvoid  ",
			"OP_0x50       ",
			"OP_0x51       ",
			"OP_0x52       ",
			"OP_0x53       ",
			"OP_0x54       ",
			"newobject     ",
			"newarray      ",
			"newactivation ",
			"newclass      ",
			"getdescendants",
			"newcatch      ",
			"OP_0x5B       ",
			"OP_0x5C       ",
			"findpropstrict",
			"findproperty  ",
			"finddef       ",
			"getlex        ",
			"setproperty   ",
			"getlocal      ",
			"setlocal      ",
			"getglobalscope",
			"getscopeobject",
			"getproperty   ",
			"OP_0x67       ",
			"initproperty  ",
			"OP_0x69       ",
			"deleteproperty",
			"OP_0x6A       ",
			"getslot       ",
			"setslot       ",
			"getglobalslot ",
			"setglobalslot ",
			"convert_s     ",
			"esc_xelem     ",
			"esc_xattr     ",
			"convert_i     ",
			"convert_u     ",
			"convert_d     ",
			"convert_b     ",
			"convert_o     ",
			"checkfilter   ",
			"OP_0x79       ",
			"OP_0x7A       ",
			"OP_0x7B       ",
			"OP_0x7C       ",
			"OP_0x7D       ",
			"OP_0x7E       ",
			"OP_0x7F       ",
			"coerce        ",
			"coerce_b      ",
			"coerce_a      ",
			"coerce_i      ",
			"coerce_d      ",
			"coerce_s      ",
			"astype        ",
			"astypelate    ",
			"coerce_u      ",
			"coerce_o      ",
			"OP_0x8A       ",
			"OP_0x8B       ",
			"OP_0x8C       ",
			"OP_0x8D       ",
			"OP_0x8E       ",
			"OP_0x8F       ",
			"negate        ",
			"increment     ",
			"inclocal      ",
			"decrement     ",
			"declocal      ",
			"typeof        ",
			"not           ",
			"bitnot        ",
			"OP_0x98       ",
			"OP_0x99       ",
			"concat        ",
			"add_d         ",
			"OP_0x9C       ",
			"OP_0x9D       ",
			"OP_0x9E       ",
			"OP_0x9F       ",
			"add           ",
			"subtract      ",
			"multiply      ",
			"divide        ",
			"modulo        ",
			"lshift        ",
			"rshift        ",
			"urshift       ",
			"bitand        ",
			"bitor         ",
			"bitxor        ",
			"equals        ",
			"strictequals  ",
			"lessthan      ",
			"lessequals    ",
			"greaterthan   ",
			"greaterequals ",
			"instanceof    ",
			"istype        ",
			"istypelate    ",
			"in            ",
			"OP_0xB5       ",
			"OP_0xB6       ",
			"OP_0xB7       ",
			"OP_0xB8       ",
			"OP_0xB9       ",
			"OP_0xBA       ",
			"OP_0xBB       ",
			"OP_0xBC       ",
			"OP_0xBD       ",
			"OP_0xBE       ",
			"OP_0xBF       ",
			"increment_i   ",
			"decrement_i   ",
			"inclocal_i    ",
			"declocal_i    ",
			"negate_i      ",
			"add_i         ",
			"subtract_i    ",
			"multiply_i    ",
			"OP_0xC8       ",
			"OP_0xC9       ",
			"OP_0xCA       ",
			"OP_0xCB       ",
			"OP_0xCC       ",
			"OP_0xCD       ",
			"OP_0xCE       ",
			"OP_0xCF       ",
			"getlocal0     ",
			"getlocal1     ",
			"getlocal2     ",
			"getlocal3     ",
			"setlocal0     ",
			"setlocal1     ",
			"setlocal2     ",
			"setlocal3     ",
			"OP_0xD8       ",
			"OP_0xD9       ",
			"OP_0xDA       ",
			"OP_0xDB       ",
			"OP_0xDC       ",
			"OP_0xDD       ",
			"OP_0xDE       ",
			"OP_0xDF       ",
			"OP_0xE0       ",
			"OP_0xE1       ",
			"OP_0xE2       ",
			"OP_0xE3       ",
			"OP_0xE4       ",
			"OP_0xE5       ",
			"OP_0xE6       ",
			"OP_0xE7       ",
			"OP_0xE8       ",
			"OP_0xE9       ",
			"OP_0xEA       ",
			"OP_0xEB       ",
			"OP_0xEC       ",
			"OP_0xED       ",
			"OP_0xEE       ",
			"debug         ",
			"debugline     ",
			"debugfile     ",
			"bkptline      ",
			"timestamp     ",
			"OP_0xF4       ",
			"verifypass    ",
			"alloc         ",
			"mark          ",
			"wb            ",
			"prologue      ",
			"sendenter     ",
			"doubletoatom  ",
			"sweep         ",
			"codegenop     ",
			"verifyop      ",
			"decode        "
		];
		
		
	}
	
}